package com.course.chapter6;


import java.util.concurrent.ConcurrentLinkedDeque;

public class CollectionDemo01 {

    public static void main(String[] args) {
        ConcurrentLinkedDeque<String> cld =new ConcurrentLinkedDeque();
        new Thread(()->{
            for (int i = 0; i < 20; i++) {
                cld.add("aaa"+i);
            }
        }).start();
        new Thread(()->{
            for (int i = 0; i < 20; i++) {
                System.out.println(cld.pollLast());
            }
        }).start();


    }
}
